home *** CD-ROM | disk | FTP | other *** search
- Path: coke.engr.utk.edu!mbk
- From: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: type checking in C++ was Re: Hungarian notation
- Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Date: 17 Jan 1996 20:20:30 GMT
- Organization: University of Tennessee, Knoxville
- Message-ID: <4djlme$kf3@gaia.ns.utk.edu>
- References: <4cf8hf$8fe@hopi.gate.net> <DKoBrn.CHs@falcon.daytonoh.attgis.com> <4d1j37$ge8@stc06.ctd.ornl.gov> <9601221.15716@mulga.cs.mu.OZ.AU>
- Reply-To: kennel@msr.epm.ornl.gov
- NNTP-Posting-Host: 128.169.100.253
- X-Newsreader: TIN [version 1.2 PL2]
-
- Fergus Henderson (fjh@munta.cs.mu.OZ.AU) wrote:
- : mbk@jt3ws1.etd.ornl.gov (Kennel) writes:
-
- : >Dick Menninger (Dick.Menninger@DaytonOH.ATTGIS.COM) wrote:
- : >> The purpose of C++ in its design
- : >> and evolution has been to hide implementation while
- : >> providing genuinely heavy duty compile-time type checking.
- : >
- : >Is the goal actually achieved? "heavy duty compile-time type-checking?"
-
- : No; the need for backwards compatibility means that it will never be
- : fully achieved.
-
- : >At one point something like this could be a problem. It it still?
- : >
- : >function(Type *p) {
- : >
- : >// One of this may silently crash or do bad things. Both typecheck.
- : >
- : >// delete p;
- : >// delete [] p;
- : >
- : >}
-
- : Yes, that is still a problem. However, it is less of a problem than
- : it used to be, because there is now a standard `vector<T>' class
- : which can be used instead of C's builtin arrays.
-
- That's good to hear. Is this widely implemented? Is it as efficient
- as built-in arrays? Can it handle value types as T as well as pointers?
-
- Of course I think it's rather inappropriate to name something a "vector" if it
- doesn't have elements which have group structure and have the appropriate
- invariant properties. "array" is perfectly correct and well used.
-
- : --
- : Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
- : fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
-